package com.lxx.wiki.domain.resp;

/**
 * 定义通用返回类
 * @param <T>
 */
public class CommonResp<T> {
    /**
     * 业务上的成功或失败
     * 10000 表示成功
     */
    private Integer code = 10000;

    /**
     * 返回信息
     */
    private String message = "Success";

    /**
     * 返回泛型数据，自定义类型
     */
    private T content;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "CommonResp{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", content=" + content +
                '}';
    }
}
